/**
 * Copyright (C), 2019-2020, 宇信融汇
 * FileName: T1
 * Author:   xbliu
 * Date:     2020/6/11 10:52
 * Description:
 * History:
 * <author>          <time>          <version>          <desc>
 * xbliu           修改时间           版本号              描述
 */
package c_002;

/**
 * @Classname T1
 * @Description TODO
 * @Date 2020/6/11 10:52
 * @Created by xbliu
 */
public class T1 {
    int x;
    int y;
    //设置二维的坐标点
    public void set(int xx,int yy){
        x = xx;
        y = yy;
    }
    public void show(){
        System.out.println("["+x+","+y+"]");
    }
    public void changePoint(T1 p){
        int a = p.x;
        p.x = x;
        x = a;
        int b = p.y;
        p.y = y;
        y = b;
    }

    public static void main(String[] args) {
        T1 p2 = new T1();
        p2.set(2,4);
        T1 p1 = new T1();
        p1.set(3,5);

        p1.changePoint(p2);
        p1.show();
        p2.show();
    }
}
